package io.gitee.hefren.hhcache.core;

import com.google.common.base.MoreObjects;

public enum ReplyTypeEnum {
    SIMPLY_STRING("+"),
    BULK_STRING("$"),
    ERROR("-"),
    INTEGER(":"),
    ARRAY("*")
    ;

    private final String prefix;

    ReplyTypeEnum(String prefix) {
        this.prefix = prefix;
    }

    public String getPrefix() {
        return prefix;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(ReplyTypeEnum.class)
                .add("prefix", prefix)
                .add("name", name())
                .toString();
    }
}
